export default Vue.component("news", {
    // props: ["ctime", "title", "description", "source", "picurl", "url"],
    props:["obj"],
    data(){
        return {
            style:{
                width:"400px",
                margin:"0 auto"
            }
        }
    }
    ,
    template: `
    <div :style="style">
        <h3>{{obj.title}}</h3>
        <span>
            来源:<a :href="obj.url">{{obj.source}}</a>
        </span>
        <span :style="{float:'right'}">{{obj.ctime}}</span>
        <p>{{obj.description}}</p>
        <div>
            <img :src="obj.picUrl" alt="failed">
        </div>
    </div>
    `
});
